package org.grow.stable.security.dao;
import org.grow.stable.security.domain.Permission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import javax.transaction.Transactional;

@Repository
public interface PermissionDao extends JpaRepository<Permission,String> {
    Permission findByName(String code);

    @Transactional
    void deleteByName(String code);

    Permission findByPath(String path);

}
